import { getItem,setItem,removeItem } from '../store'
import * as type from '../types'

const user = {
    state: {
        user:getItem("user")
    },
    mutations: {
        setToken(state:type.userInfo,data:any) {
            state.user = data
            setItem(state.user)
        },
        setUser(state:type.userInfo,data:any) {
            state.user = data
            setItem(state.user)
        }
    },
    actions: {

    }
}



export default user